package com.shuiyun.jtt.message.jt808;

import com.shuiyun.jtt.anno.Message;
import com.shuiyun.jtt.enums.JT808;
import com.shuiyun.jtt.message.JTMessage;
import com.shuiyun.jtt.utils.codec.DataType;
import com.shuiyun.jtt.utils.codec.FieldValue;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * @author shuiyun
 * @program device-simulator
 * @description 驾驶员信息上传
 * @date 2022-05-05 21:17
 **/
@EqualsAndHashCode(callSuper = true)
@Data
@Message(value = JT808.驾驶员身份信息采集上报0x0702)
public class T0702 extends JTMessage {

    @FieldValue(type = DataType.BYTE,desc = "状态")
    private Integer status;

    @FieldValue(type = DataType.BCD,desc = "时间")
    private Date dateTime;

    @FieldValue(type = DataType.BYTE,desc = "IC卡读取结果")
    private Integer cardStatus;

    @FieldValue(type = DataType.STRING,lengthSize = 1,desc = "驾驶员名称")
    private String name;

    @FieldValue(type = DataType.STRING,length = 20,desc = "从业资格证号")
    private String licenseNo;

    @FieldValue(type = DataType.STRING,lengthSize = 1,desc = "发证机构名称")
    private String institution;

    @FieldValue(type = DataType.BCD8421,length = 4,desc = "证件有效期")
    private String licenseValidPeriod;

    @FieldValue(type = DataType.STRING,length = 20,desc = "驾驶员身份证号")
    private String idCard;
}
